package com.test;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

import com.dalin.common.utils.DateUtils;

/*

*/
public class Demo {
	public static void main(String[] args) throws ParseException{
		new MyThread1("AA").run();
		new MyThread1("BB").run();
		System.out.println("aaaaaaaaaa");
	};
}
class Test {
	public void print(String s) {
		System.out.println(s);
	}
}
class MyThread1 extends Thread {
	private String name;
	public MyThread1(String name) {
		this.name=name;
	}
	public void run() {
		try {
			for (int i=0;i < 5;i++) {
				System.out.println(name+i);
				/*Test t = new Test();
				t.print(name+"11111111");*/
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}		
	}
}
class MyThread2 extends Thread {
	public void run() {
		try {
			while (true) {
				Test t = new Test();
				t.print("22222222");
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}		
	}	
}